package org.xtframe.dao;

import java.util.List;
import java.util.Map;

import org.hibernate.SessionFactory;
import org.xtframe.sql.PreparedParameter;
import org.xtframe.vo.TableColumnsVO;
import org.xtframe.vo.TableFieldVO;
import org.xtframe.vo.TableStatusVO;

public interface DataBaseDao {
	
	public SessionFactory getSessionFactory();
	
	public void setSessionFactory(SessionFactory sessionFactory);
	
	public List<Map<String, Object>> executeQuery(String sql, List<PreparedParameter> preparedParameters);

	public List<String> executeQuery(String sql, int columnIndex, List<PreparedParameter> preparedParameters);

	public int executeUpdate(String sql, List<PreparedParameter> preparedParameters);
	
	public int[] excuteTransaction(List<String> sqlList, List<List<PreparedParameter>> preparedParametersList);

	public Map<String, Object> execute(String sql);

	public int insert(String sql, List<PreparedParameter> preparedParameters) throws Exception;

	public String findFirst(String sql, int columnIndex);

	public int findRows(String sql);

	public long findTableSize(String sql);

	public List<TableFieldVO> findTableFields(String tableName);

	public List<TableColumnsVO> findTableColumns(String tableName);

	public List<TableStatusVO> findTableStatus(String sql);
	
	public long sequenceNextVal(String name);
}